﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="eCard_input.aspx.cs" Inherits="Customer_Profile.eCard.eCard_input" %>
<%@ Register Src="../mainTop.ascx" TagName="mainTop" TagPrefix="uc1" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<HTML>
	<HEAD>
		<title>UsergroupModify</title>
		<LINK href="/css/style.css" type="text/css" rel="stylesheet">
        <script language="javascript" type="text/javascript" src="/js/common.js"></script>
        <script language="javascript" type="text/javascript" src="/js/CalPopUp.js"></script>
            <script language="javascript">                
                // <!CDATA[
                //function is called on changing focused row
                function OnGridFocusedRowChanged() {
                    // Query the server for the "EmployeeID" and "Notes" fields from the focused row 
                    // The values will be returned to the OnGetRowValues() function
                    gridBank.GetRowValues(gridBank.GetFocusedRowIndex(), 'transfer_id;deal_no;card_no;account_name;bank_name;account_no;transfer_type;transfer_amount;to_account;transfer_date;remark', OnGetRowValues);
                }
                //Value array contains "EmployeeID" and "Notes" field values returned from the server 
                function OnGetRowValues(values) {
                    //txtAccountName..SetImageUrl("FocusedRow.aspx?Photo=" + values[0]);
                    account_name.SetText(values[3]);
                    account_no.SetText(values[5]);
                    to_account.SetText(values[8]);
                    bank_name.SetText(values[4]);
                    transfer_type.SetText(values[6]);
                    transfer_amount.SetText(values[7]);
                    transfer_date.SetText(values[9]);
                    remark.SetText(values[10]);

                    var transferid = document.getElementById("transfer_id");
                    transferid.value = values[0];
                }

                function checkok() {
                    var transferid = document.getElementById("transfer_id");
                    if (transferid.value == 'null' || transferid.value == '') {
                        alert("请先选择一行");
                        return false;
                    }

                    return confirm("你确认要删除吗？");
                }

                function calcAmount() {
                    var dropProdtext = document.getElementById("dropProd");
                    var standDiscount = dropProdtext.options[dropProdtext.selectedIndex].text.split('|')[2].toString();
                    var realDiscount = document.getElementById("txtRealdiscount");
                    var realAmount = document.getElementById("txtRealAmount");
                    var IncardAmount = document.getElementById("txtIncardAmount");
                    var AmountSpread = document.getElementById("txtSpread");
                    var AmountHQ = document.getElementById("txtHQ");
                    realDiscount.value = trim(standDiscount);

                    if (trim(realAmount.value) != '') {                       
                        var deincardAmount = parseFloat(realAmount.value / realDiscount.value);
                        IncardAmount.value = formatFloat(deincardAmount, 2);
                        deAmountHQ =parseFloat((realAmount.value / realDiscount.value) * standDiscount);
                        AmountHQ.value = formatFloat(deAmountHQ, 2);
                        AmountSpread.value = formatFloat(realAmount.value - AmountHQ.value, 2);
                    }
                }

                function calcAmount_byAmount() {
                    var dropProdtext = document.getElementById("dropProd");
                    var standDiscount = dropProdtext.options[dropProdtext.selectedIndex].text.split('|')[2].toString();
                    var realDiscount = document.getElementById("txtRealdiscount");
                    var realAmount = document.getElementById("txtRealAmount");
                    var IncardAmount = document.getElementById("txtIncardAmount");
                    var AmountSpread = document.getElementById("txtSpread");
                    var AmountHQ = document.getElementById("txtHQ");
                    //realDiscount.value = trim(standDiscount);

                    if (trim(realAmount.value) != '') {
                        var deincardAmount = parseFloat(realAmount.value / realDiscount.value);
                        IncardAmount.value = formatFloat(deincardAmount, 2);
                        deAmountHQ = parseFloat((realAmount.value / realDiscount.value) * standDiscount);
                        AmountHQ.value = formatFloat(deAmountHQ, 2);
                        AmountSpread.value = formatFloat(realAmount.value - AmountHQ.value, 2);
                    }
                }

                function calcAmount1() {
                    var dropProdtext = document.getElementById("dropProd");
                    var standDiscount = dropProdtext.options[dropProdtext.selectedIndex].text.split('|')[2].toString();
                    var realDiscount = document.getElementById("txtRealdiscount");
                    var realAmount = document.getElementById("txtRealAmount");
                    var IncardAmount = document.getElementById("txtIncardAmount");
                    var AmountSpread = document.getElementById("txtSpread");
                    var AmountHQ = document.getElementById("txtHQ");

                   if (trim(realAmount.value) != '') {
                        var deincardAmount = parseFloat(realAmount.value / realDiscount.value);
                        IncardAmount.value =formatFloat(deincardAmount,2);
                        deAmountHQ =parseFloat((realAmount.value / realDiscount.value) * standDiscount);
                        AmountHQ.value = formatFloat(deAmountHQ, 2);
                        AmountSpread.value =formatFloat(realAmount.value - AmountHQ.value,2);
                    }
                }

                function checkDealSave() {
                    var ifagent = document.getElementById("checkAgentSale");
                    var cpartyno = document.getElementById("txtcpartyno").value;
                    if (ifagent.checked) {                        
                        var Cardno = document.getElementById("txtCardnoAgent").value;
                        var RealAmount = document.getElementById("txtAgentRealAmount").value;
                        var IncardAmount = document.getElementById("txtAgentIncardAmount").value;
                        var Realdiscount = document.getElementById("txtRealSaleDiscount").value;
                    }
                    else {
                        var Cardno = document.getElementById("txtCardno").value;
                        var RealAmount = document.getElementById("txtRealAmount").value;
                        var IncardAmount = document.getElementById("txtIncardAmount").value;
                        var Realdiscount = document.getElementById("txtRealdiscount").value;
                    }
                    if (cpartyno == '') {
                        alert("请先选择客户！");
                        return false;
                    }
                    if (Cardno == '') {
                        alert("请填写卡号！");
                        return false;
                    }
                    if (RealAmount == '') {
                        alert("请填写实收金额！");
                        return false;
                    }
                    if (IncardAmount == '') {
                        alert("请填写兑付金额！");
                        return false;
                    }
                    if (Realdiscount == '') {
                        alert("请填写真实折扣金额！");
                        return false;
                    }
                    return true;
                }

                function calcAmount_agent() {
                    var dropProdtext = document.getElementById("dropProdAgent");
                    var standDiscount = dropProdtext.options[dropProdtext.selectedIndex].text.split('|')[2].toString();
                    var realDiscount = document.getElementById("txtRealSaleDiscount");
                    var realAmount = document.getElementById("txtAgentRealAmount");
                    var IncardAmount = document.getElementById("txtAgentIncardAmount");
                    var AmountSpread = document.getElementById("txtAgentSpread");
                    var AmountHQ = document.getElementById("txtAgentHQ");
                    
                    //realDiscount.value = trim(standDiscount);

                    if (trim(realAmount.value) != '') {
                        //alert(realAmount.value);
                        //alert(realDiscount.value);
                        var deincardAmount = parseFloat(realAmount.value / realDiscount.value);
                        IncardAmount.value = formatFloat(deincardAmount, 2);
                        deAmountHQ = parseFloat((realAmount.value / realDiscount.value) * standDiscount);
                        AmountHQ.value = formatFloat(deAmountHQ, 2);
                        AmountSpread.value = formatFloat(realAmount.value - AmountHQ.value, 2);
                    }                    
                }
                function calcAmount1_agent() {
                    var dropProdtext = document.getElementById("dropProd");
                    var standDiscount = dropProdtext.options[dropProdtext.selectedIndex].text.split('|')[2].toString();
                    var realDiscount = document.getElementById("txtRealdiscount");
                    var realAmount = document.getElementById("txtRealAmount");
                    var IncardAmount = document.getElementById("txtIncardAmount");
                    var AmountSpread = document.getElementById("txtSpread");
                    var AmountHQ = document.getElementById("txtHQ");

                    if (trim(realAmount.value) != '') {
                        var deincardAmount = parseFloat(realAmount.value / realDiscount.value);
                        IncardAmount.value = formatFloat(deincardAmount, 2);
                        deAmountHQ = parseFloat((realAmount.value / realDiscount.value) * standDiscount);
                        AmountHQ.value = formatFloat(deAmountHQ, 2);
                        AmountSpread.value = formatFloat(realAmount.value - AmountHQ.value, 2);
                    }
                }

                function checkform() {
                    var transferid = document.getElementById("transfer_id");
                    if (transferid.value == 'null' || transferid.value == '') {
                        alert("请先选择一行");
                        return false;
                    }
                    
                    return true;
                }

                function checkDelete() {
                    return confirm("你确认要删除吗？删除后数据将无法找回！");
                }

                function checkSubmit() {
                    var value_amount = document.getElementById("txtRealAmount").value;
                    var transfer_amount = document.getElementById("hidSumAmount").value;
                    if (Math.floor(value_amount) - Math.floor(transfer_amount) !=0) {
                        return confirm("购买金额："+value_amount + " 不等于 汇款总额：" + transfer_amount + "，你确认要提交吗？可能会被打回。");
                    }
                    else {
                        return confirm("你确认要提交到交易总部吗？");
                    }
                }

                function filecheckok() {
                    var filepath = document.getElementById("FileUpload1");
                    if (filepath.value == 'null' || filepath.value == '') {
                        alert("请先选择要上传的文件");
                        return false;
                    }
                    var dealno = document.getElementById("hiddealno");
                    if (dealno.value == 'null' || dealno.value == '') {
                        alert("请先完成交易信息数据的保存后再上传附件!");
                        return false;
                    }

                    return true;
                }

                function GetPageRowValues() {                    
                    gridBank.GetPageRowValues("transfer_amount", GetPageRowValues_Callback);
                }
                function GetPageRowValues_Callback(result) {
                    
                    var resiltStr = 0;
                    if (result.length > 0) {
                        for (var i = 0; i < result.length; i++) {
                            resiltStr += parseFloat(result[i].toString());
                        }
                  }
                  var hidSumAmount = document.getElementById("hidSumAmount");
                  hidSumAmount.value = resiltStr
                  //alert(resiltStr);                  
                }

    </script>
</HEAD>
	<body  bgcolor="#ffffff" leftmargin="0" topmargin="0">
		<form id="Form1" method="post" runat="server">       
			<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="1" background="/images/dot_vline.gif"><img src="/images/spacer.gif" width="1" height="1"></td>
					<td width="15" valign="top"><img src="/images/spacer.gif" width="15" height="1"></td>
					<td valign="top">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td><img src="/images/spacer.gif" width="1" height="5"></td>
							</tr>
							<tr>
								<td height="23"><span class="navi-blk">
                                    <uc1:mainTop ID="MainTop1" runat="server" />
										个人旅行卡管理>交易管理>交易添加</span></td>
							</tr>
							<tr>
								<td background="/images/dot_hline.gif"><img src="/images/spacer.gif" width="1" height="1"></td>
							</tr>
						</table>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td><img src="/images/spacer.gif" width="1" height="8"></td>
							</tr>
						</table>
						<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<td valign="top">
                                    <!--客户信息-->
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td bgcolor="#1765a7"><img src="/images/spacer.gif" width="1" height="3"></td>
										</tr>
										<tr>
											<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="12" class="bglist1"><img src="/images/arw_blu_rgt.gif" width="4" height="7"></td>
														<td class="bglist1">用户信息</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td><img src="/images/spacer.gif" width="1" height="1"></td>
										</tr>
									</table>
                                   
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
										        <tr>
											        <td class="bglist-3"  width="10%">证件号码：</td>
											        <td class="bglist-4"  width="40%">
												        <input name="name" type="text" class="input2" id="txtsearchno" size="26" runat="server">
                                                        <asp:Button Text="搜" ID="serach" runat="server" class="button"  UseSubmitBehavior="false"
                                                            onclick="serach_Click"/>
                                                        <input type="button" value="加" class="button" onclick="javascript:window.open('CpartyAdd.aspx');return false" />
                                                        <asp:TextBox ID="txtcpartyno" class="input2" size="5" runat="server" Enabled="false"></asp:TextBox>
											        </td>
											        <td class="bglist-3"  width="10%">购卡人(乙方)：</td>
											        <td class="bglist-4">
												        <input name="cparty_name" type="text" class="input2" id="txtName" size="20" runat="server" disabled=disabled>
                                                        <font color="red">注：合同签订方名称</font>
											        </td>
										        </tr>
                                                <tr>
											        <td class="bglist-3">证件类型：</td>
											        <td class="bglist-4">
                                                        <asp:DropDownList ID="dropIDtype" runat=server Enabled="false" ></asp:DropDownList>
                                                        <input name="cparty_idcode" type="text" class="input2" id="txtIDcode" size="24" runat="server" disabled=disabled>
											        </td>
											        <td class="bglist-3">联系方式：</td>
											        <td class="bglist-4">
												        <input name="cparty_idcode" type="text" class="input2" id="txtPhone" size="12" runat="server" disabled=disabled>&nbsp;
                                                        <input name="cparty_idcode" type="text" class="input2" id="txtAddress" size="36" runat="server" disabled=disabled>
											        </td>
										        </tr>
                                           </table>
                                         <!--交易信息-->
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
										        <tr>
											        <td bgcolor="#1765a7"><img src="/images/spacer.gif" width="1" height="3"></td>
										        </tr>
										        <tr>
											        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
													        <tr>
														        <td width="12" class="bglist1"><img src="/images/arw_blu_rgt.gif" width="4" height="7"></td>
														        <td class="bglist1">
                                                                交易信息
                                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:CheckBox ID="checkAgentSale" runat="server" Text="代理销售" AutoPostBack="True" oncheckedchanged="checkAgentSale_CheckedChanged" />
                                                                </td>                                                        
													        </tr>
												        </table>
											        </td>
										        </tr>
										        <tr>
											        <td><img src="/images/spacer.gif" width="1" height="1"></td>
										        </tr>
									        </table>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">										
                                                <tr>
                                                    <td colspan="4">
                                                       <!--分子公司销售-->
                                                       <table width="100%" border="0" cellspacing="0" cellpadding="0" ID="tbNormal" runat="server">
                                                            <tr>
											                    <td class="bglist-3" width="10%">产品名称：</td>
											                    <td class="bglist-4" width="40%">
                                                                    <asp:DropDownList ID="dropProd" runat="server" CssClass="input3" onchange="calcAmount();"></asp:DropDownList>&nbsp;
                                                                    <asp:HiddenField ID="hiddealno" runat="server" />
											                    </td>
                                                                <td class="bglist-3" width="10%">卡号：<font color="red">*</font></td>
											                        <td class="bglist-4" width="40%">
												                        <input name="email" type="text" class="input2" id="txtCardno" size="36" runat="server">
											                    </td>
										                    </tr>
                                                            <tr>											            
											                    <td class="bglist-3" width="10%">到期处理：</td>
											                        <td class="bglist-4" width="40%">
												                        <asp:DropDownList ID="dropDueProd" runat="server" CssClass="input3" ></asp:DropDownList>&nbsp;
											                    </td>
                                                                <td class="bglist-3"  >到期说明：</td>
											                    <td class="bglist-4">
												                    <input name="email" type="text" class="input2" id="txtDueProdRemark" size="36" runat="server">
											                    </td>
										                    </tr>                                                    
                                                            <tr>
											                    <td class="bglist-3"  >实收金额：<font color="red">*</font></td>
											                    <td class="bglist-4"  >
												                    <input name="name" type="text" class="input2" id="txtRealAmount" size="18" onblur="calcAmount_byAmount()" runat="server">
                                                                    <input name="name" type="text" class="input2" id="txtHQ" readonly="readonly" size="18" runat="server">
											                    </td>
											                    <td class="bglist-3"  >到期金额：</td>
											                    <td class="bglist-4">
												                    <input name="email" type="text" class="input2" readonly="readonly" id="txtIncardAmount" size="36" runat="server">
											                    </td>
										                    </tr>
                                                            <tr>
                                                                <td class="bglist-3">实际折扣：<font color="red">*</font></td>
											                    <td class="bglist-4">
												                    <input name="name" type="text" class="input2" id="txtRealdiscount" size="36" onblur="calcAmount1()" runat="server">
											                    </td>
											                    <td class="bglist-3">金额差：</td>
											                    <td class="bglist-4">
                                                                    <input name="name" type="text" class="input2" id="txtSpread" readonly="readonly" size="36" runat="server">
											                    </td>
										                    </tr>
                                                        </table>
                                                       <!--代理销售-->
                                                       <table width="100%" border="0" cellspacing="0" cellpadding="0" ID="tbAgentSale" runat="server">
                                                            <tr>
                                                                <td class="bglist-3"  width="10%">代理名称：</td>
											                    <td class="bglist-4"  width="40%">												
                                                                    <asp:DropDownList ID="dropAgentName" runat="server" CssClass="input3"></asp:DropDownList>
											                    </td>
                                                                <td class="bglist-3"  width="10%">代理标准：</td>
											                    <td class="bglist-4">
                                                                    <input name="name" type="text" class="input2" id="txtAgentDiscount" disabled="disabled" size="36" runat="server">
											                    </td>
                                                            </tr>
                                                            <tr>
											                    <td class="bglist-3"  width="10%">产品名称：</td>
											                    <td class="bglist-4"  width="40%">												
                                                                    <asp:DropDownList ID="dropProdAgent" runat="server" CssClass="input3" onchange="calcAmount_agent();"></asp:DropDownList>&nbsp;                                                            
                                                                    <asp:HiddenField ID="HiddenField1" runat="server" />                                                            
											                    </td>
                                                                <td class="bglist-3"  width="10%">卡号：<font color="red">*</font></td>
											                    <td class="bglist-4">
												                    <input name="email" type="text" class="input2" id="txtCardnoAgent" size="36" runat="server">
											                    </td>
										                    </tr>
                                                            <tr>											            
											                    <td class="bglist-3"  width="10%">到期处理：</td>
											                    <td class="bglist-4">
												                    <asp:DropDownList ID="dropDueProdAgent" runat="server" CssClass="input3"></asp:DropDownList>&nbsp;
											                    </td>
                                                                <td class="bglist-3">到期提示：</td>
											                    <td class="bglist-4">
												                   <input name="email" type="text" class="input2" id="txtDueProdRemarkAgent" size="36" runat="server">
											                    </td>
										                    </tr>
                                                            <tr>
											                    <td class="bglist-3" >实收金额：<font color="red">*</font></td>
											                    <td class="bglist-4">
												                    <input name="name" type="text" class="input2" id="txtAgentRealAmount" size="18" runat="server" onblur="calcAmount_agent();">
                                                                    <input name="name" type="text" class="input2" id="txtAgentHQ" size="18" runat="server">
											                    </td>
											                    <td class="bglist-3">到期金额：</td>
											                    <td class="bglist-4">
												                    <input name="email" type="text" class="input2" readonly="readonly" id="txtAgentIncardAmount" size="36" runat="server">
											                    </td>
										                    </tr>
                                                            <tr>
                                                                <td class="bglist-3">实际折扣：<font color="red">*</font></td>
											                    <td class="bglist-4">
												                    <input name="name" type="text" class="input2" id="txtRealSaleDiscount" size="36" runat="server" onblur="calcAmount_agent();">
											                    </td>
											                    <td class="bglist-3">金额差</td>
											                    <td class="bglist-4">
                                                                    <input name="name" type="text" class="input2" id="txtAgentSpread" readonly="readonly" size="36" runat="server">
											                    </td>
										                    </tr>
                                                        </table>
                                                    </td>
                                                </tr>                                               
                                                <tr>
											        <td class="bglist-3" width="10%">销售地区：</td>
											        <td class="bglist-4" width="40%">
                                                        <asp:DropDownList ID="dropSaleEntity" Enabled="false"  CssClass="input3" runat="server"></asp:DropDownList>
											        </td>
											        <td class="bglist-3" rowspan="2" width="10%">指定人：</td>
                                                    <td class="bglist-4" rowspan="2" width="40%">
                                                        <asp:TextBox ID="txtDesignee" runat="server" class="input1" Height=35 TextMode="MultiLine" Width=280></asp:TextBox>
											        </td>
										        </tr>
                                                <tr>
                                                    <td class="bglist-3" width="10%">销售人员：</td>
											        <td class="bglist-4" width="40%">
												        <input name="email" type="text" class="input2" id="txtDealer" size="36" runat="server">
											        </td>
                                                </tr>
                                                <tr>
											        <td class="bglist-3">备注：</td>
											        <td class="bglist-4" >
												        <input name="name" type="text" class="input2" id="txtRemark" size="36" runat="server">
											        </td>
                                                    <td class="bglist-3">退回原因：</td>
											        <td class="bglist-4" >
												        <input name="name" type="text" readonly class="input2" id="txtBackReason" size="36" runat="server">
											        </td>
										        </tr>                                        
										        <tr>
                                                    <td colspan="3" class="bglist-3">
                                                        <asp:Label id="lbWarning" runat="server" Text="提示信息：" ForeColor="Red"></asp:Label>
                                                    </td>
											        <td class="bglist-4"><div align="right">
													        <asp:Button ID="btnDealSave" runat="server" class="button" Text="保存" OnClientClick="return checkDealSave();"
                                                                onclick="btnDealSave_Click"  />
												        </div>
											        </td>
										        </tr>
									        </table>
                                    <!--汇款信息-->
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td bgcolor="#1765a7"><img src="/images/spacer.gif" width="1" height="3"></td>
										</tr>
										<tr>
											<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="12" class="bglist1"><img src="/images/arw_blu_rgt.gif" width="4" height="7"></td>
														<td class="bglist1">汇款信息</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td><img src="/images/spacer.gif" width="1" height="1"></td>
										</tr>
									</table>
                                            <table width="100%" border="1" cellspacing="0" cellpadding="0">
										        <tr>
											        <td colspan="4">
                                                        <dx:ASPxGridView ID="gridBank" ClientInstanceName="gridBank" runat="server"  
                                                            Width="100%" KeyFieldName="transfer_id" 
                                                            CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                                                            CssPostfix="Office2003Blue" AutoGenerateColumns="False">
                                                            <SettingsBehavior AllowMultiSelection="True" AllowFocusedRow="True" />
                                                            <ClientSideEvents FocusedRowChanged="function(s, e) { OnGridFocusedRowChanged(); }" Init="function(s, e) {	GetPageRowValues();}"/>                                                                                 
                                                            <SettingsPager Mode="ShowAllRecords">
                                                            </SettingsPager>                                                            
                                                            <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                                                                <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                                                                </LoadingPanelOnStatusBar>
                                                                <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                                                                </LoadingPanel>
                                                            </Images>
                                                            <ImagesFilterControl>
                                                                <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                                                                </LoadingPanel>
                                                            </ImagesFilterControl>
                                                            <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                                                                CssPostfix="Office2003Blue">
                                                                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                </Header>
                                                                <LoadingPanel ImageSpacing="10px">
                                                                </LoadingPanel>
                                                            </Styles>
                                                            <StylesEditors>
                                                                <ProgressBar Height="25px">
                                                                </ProgressBar>
                                                            </StylesEditors>
                                                             <Columns>    
                                                                 <dx:GridViewCommandColumn ShowSelectCheckbox="True" Visible="false"></dx:GridViewCommandColumn>                                                             
                                                                 <dx:GridViewDataColumn FieldName="transfer_id" VisibleIndex="1" Caption="编号" />                        
                                                                 <dx:GridViewDataColumn FieldName="deal_no" VisibleIndex="2" Caption="交易号" />                        
                                                                 <dx:GridViewDataColumn FieldName="card_no" VisibleIndex="3" Caption="卡号" />
                                                                 <dx:GridViewDataColumn FieldName="account_name" VisibleIndex="4" Caption="账户名称" />
                                                                 <dx:GridViewDataColumn FieldName="bank_name" VisibleIndex="5" Caption="银行名称" />
                                                                 <dx:GridViewDataColumn FieldName="account_no" VisibleIndex="6" Caption="银行账号" />
                                                                 <dx:GridViewDataColumn FieldName="transfer_type" VisibleIndex="7" Caption="付款类型" />
                                                                 <dx:GridViewDataColumn FieldName="transfer_amount" VisibleIndex="8" Caption="付款金额" />
                                                                 <dx:GridViewDataColumn FieldName="to_account" VisibleIndex="9" Caption="到账账户" />
                                                                 <dx:GridViewDataColumn FieldName="transfer_date" VisibleIndex="10" Caption="付款日期" />
                                                                 <dx:GridViewDataColumn FieldName="remark" VisibleIndex="11" Caption="备注" />
                                                             </Columns>
                                                        </dx:ASPxGridView>
                                                        <asp:HiddenField ID="hidSumAmount" runat="server" />
                                                    </td>											
										        </tr>
                                                <tr>
										            <td>
                                                        账户名：<font color="red">*</font>
                                                        <asp:HiddenField ID="transfer_id" runat="server" />
                                                    </td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="account_name" runat="server" Size="30" ClientInstanceName="account_name">
                                                            <validationsettings>
                                                                <requiredfield isrequired="True" />
                                                            </validationsettings>
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                    <td>
                                                        账户号：<font color="red">*</font>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="account_no" runat="server" Size="30" ClientInstanceName="account_no">
                                                            <validationsettings>
                                                                <requiredfield isrequired="True" />
                                                            </validationsettings>
                                                        </dx:ASPxTextBox>
                                                    </td>
										        </tr>
                                                <tr>
										            <td>
                                                        银行名：<font color="red">*</font>
                                                    </td>
                                                    <td>
                                                         <dx:ASPxTextBox ID="bank_name" runat="server"  Size="30" ClientInstanceName="bank_name">
                                                             <validationsettings>
                                                                 <requiredfield isrequired="True" />
                                                             </validationsettings>
                                                         </dx:ASPxTextBox>
                                                    </td>
                                                    <td>
                                                        付款类型：<font color="red">*</font>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxComboBox ID="transfer_type" runat="server" ClientInstanceName="transfer_type">
                                                            <validationsettings>
                                                                <requiredfield isrequired="True" />
                                                            </validationsettings>
                                                        </dx:ASPxComboBox>
                                                    </td>
										        </tr>
                                                <tr>
										            <td>
                                                        付款金额：<font color="red">*</font>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="transfer_amount" runat="server" Size="30" ClientInstanceName="transfer_amount">
                                                            <validationsettings>
                                                                <requiredfield isrequired="True" />
                                                            </validationsettings>
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                    <td>
                                                        转入账户：<font color="red">*</font>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxComboBox ID="to_account" runat="server" ClientInstanceName="to_account">
                                                            <validationsettings>
                                                                <requiredfield isrequired="True" />
                                                            </validationsettings>
                                                        </dx:ASPxComboBox>
                                                    </td>
										        </tr>
                                                <tr>
                                                    <td>
                                                       付款时间： <font color="red">*</font>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxDateEdit ID="transfer_date" runat="server">
                                                            <validationsettings>
                                                                <requiredfield isrequired="True" />
                                                            </validationsettings>
                                                        </dx:ASPxDateEdit>                                                
                                                    </td>
                                                    <td>
                                                       备注： 
                                                    </td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="remark" runat="server"  Size="30" ClientInstanceName="remark"></dx:ASPxTextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="4">
                                                        <asp:Label ID="lblTransferWarning" runat="server" Text="提示信息：" ForeColor="Red"></asp:Label>
                                                        <asp:Button ID="btnNew" runat="server" Text="新增" onclick="btnNew_Click"  UseSubmitBehavior="false"/>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:Button ID="btnEdit" runat="server" Text="修改"  OnClientClick="return checkform()" onclick="btnEdit_Click" />
                                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:Button ID="btnDelete" runat="server" Text="删除" OnClientClick="return checkok();" onclick="btnDelete_Click" />
                                                    </td>
                                                </tr>
									        </table>                                        
                                    <!--附件信息-->
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td bgcolor="#1765a7"><img src="/images/spacer.gif" width="1" height="3"></td>
										</tr>
										<tr>
											<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="12" class="bglist1"><img src="/images/arw_blu_rgt.gif" width="4" height="7"></td>
														<td class="bglist1">附件信息
                                                        <asp:Label ID="lblAttachWarning" runat="server" Text="提示信息：" ForeColor="Red"></asp:Label>
                                                        </td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td><img src="/images/spacer.gif" width="1" height="1"></td>
										</tr>
									</table>
                                    
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
											        <td bgcolor="#1765a7"><img src="/images/spacer.gif" width="1" height="3"></td>
										        </tr>
                                                <tr>
                                                    <td>
                                                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                        <tr>                                                   
                                                            <td  width="75%">
                                                                <dx:ASPxGridView ID="gridAttach" runat="server" Width="100%" CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                                                                    CssPostfix="Office2003Blue" oncustombuttoncallback="gridAttach_CustomButtonCallback">
                                                                    <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                                                                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                                                                        </LoadingPanelOnStatusBar>
                                                                        <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                                                                        </LoadingPanel>
                                                                    </Images>
                                                                    <SettingsPager Mode="ShowAllRecords">
                                                                    </SettingsPager>
                                                                    <ImagesFilterControl>
                                                                        <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                                                                        </LoadingPanel>
                                                                    </ImagesFilterControl>
                                                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                                                                        CssPostfix="Office2003Blue">
                                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                        </Header>
                                                                        <LoadingPanel ImageSpacing="10px">
                                                                        </LoadingPanel>
                                                                    </Styles>
                                                                    <StylesEditors>
                                                                        <ProgressBar Height="25px">
                                                                        </ProgressBar>
                                                                    </StylesEditors> 
                                                                    <Columns>
                                                                         <dx:GridViewDataColumn FieldName="attach_id" VisibleIndex="1" Caption="ID" />
                                                                         <dx:GridViewDataColumn FieldName="deal_no" VisibleIndex="2" Caption="交易号" />
                                                                         <dx:GridViewDataColumn Caption="显示名称" VisibleIndex="3">
                                                                             <DataItemTemplate>
                                                                                 <a href='<%#Eval("attach_url") %>' target="_blank" ><%#Eval("view_name")%></a>
                                                                             </DataItemTemplate>
                                                                         </dx:GridViewDataColumn>
                                                                         <dx:GridViewDataColumn FieldName="attach_name" VisibleIndex="4" Caption="附件名称" />
                                                                         <dx:GridViewDataColumn FieldName="attach_type" VisibleIndex="5" Caption="附件类别" />
                                                                         <dx:GridViewDataColumn FieldName="attach_size" VisibleIndex="6" Caption="大小" />
                                                                         <dx:GridViewCommandColumn VisibleIndex="7" Caption="删除">
                                                                             <CustomButtons>
                                                                                 <dx:GridViewCommandColumnCustomButton Text="删除" ID="Delete" />
                                                                             </CustomButtons>
                                                                         </dx:GridViewCommandColumn>
                                                                    </Columns>
                                                                </dx:ASPxGridView>                                                
                                                            </td>
                                                            <td width="30%">
                                                               选择文件：<asp:FileUpload ID="FileUpload1" runat="server"/><br />
                                                               <asp:Button ID="btnUpload" Text="上传" runat="server"  OnClientClick="return filecheckok();"  onclick="btnUpload_Click" />
                                                            </td>
                                                        </tr>
                                                    </table>                                                
                                                    </td>
                                                </tr>
                                            </table>
                                    <!--提交信息-->                                   
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
										        <tr>
											        <td bgcolor="#1765a7"><img src="/images/spacer.gif" width="1" height="3"></td>
										        </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblSubmitWarning" runat="server" Text="提示信息："></asp:Label>
                                                        <asp:Button ID="btnSubmit" runat="server" Text="提交交易到总部"  OnClientClick="return checkSubmit();"  onclick="btnSubmit_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:Button ID="btnCancel" runat="server" Text="删除本交易" OnClientClick="return checkDelete();" onclick="btnCancel_Click" />
                                                    </td>
                                                </tr>
                                            </table>
								</td>
							</tr>
						</table>
					</td>
					<td width="10" valign="top"><img src="/images/spacer.gif" width="10" height="1"></td>
				</tr>
			</table>
            <% =strScript %>
		</form>
	</body>
</HTML>